package router

import (
	"server/middleware"
	"github.com/gin-gonic/gin"
)

var A订单 = new(dingdan)

type dingdan struct {}

// Init 初始化 订单 路由信息
func (r *dingdan) Init(public *gin.RouterGroup, private *gin.RouterGroup) {
	{
	    group := private.Group("dingdan").Use(middleware.OperationRecord())
		group.POST("createA订单", apiA订单.CreateA订单)   // 新建订单
		group.DELETE("deleteA订单", apiA订单.DeleteA订单) // 删除订单
		group.DELETE("deleteA订单ByIds", apiA订单.DeleteA订单ByIds) // 批量删除订单
		group.PUT("updateA订单", apiA订单.UpdateA订单)    // 更新订单
	}
	{
	    group := private.Group("dingdan")
		group.GET("findA订单", apiA订单.FindA订单)        // 根据ID获取订单
		group.GET("getA订单List", apiA订单.GetA订单List)  // 获取订单列表
	}
	{
	    group := public.Group("dingdan")
	    group.GET("getA订单DataSource", apiA订单.GetA订单DataSource)  // 获取订单数据源
	    group.GET("getA订单Public", apiA订单.GetA订单Public)  // 订单开放接口
	}
}
